<template>
  <el-dialog :title="props.title" :model-value="props.visable" custom-class="dialogBox" :width="props.width?props.width:'780px'" :append-to-body="true">
    <slot name="header"></slot>
    <slot></slot>
    <template #footer>
        <!-- <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div> -->
    </template>
  </el-dialog>
</template>
<script setup name="HsDialog">
const props = defineProps({
    title:{
        type:String,
        default:"弹框标题",
    },
    width:{
        type:String,
        default:"780px",
    },
    visable:{
        type:Boolean,
        default:false,
    },
})
// const emit = defineEmits(["submitForm","cancel"]);
// function submitForm(e){
//     console.log("submitForm",e)
//     emit("submitForm")
// } 
// function cancel(e){
//     console.log("cancel",e)
//     // props.visable=false
//     emit("cancel")
// } 
</script>
<style lang="scss" scoped>
.el-select{
    width:100%;
    text-align:center;
}
.dialogBox{
  .dialog-footer{
    text-align: right;
    margin-top: 20px;
  }
}
</style>






















